﻿using Streetlight.Store.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

namespace Streetlight.Store.MvcApplication.Controllers
{
    public class StoreController : Controller
    {
        public ITransactionManager TransactionManager { get; private set; }

        public StoreController()
        {
            TransactionManager = new Streetlight.Store.DataAccess.DataManager();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && TransactionManager != null)
            {
                TransactionManager.Dispose();
            }

            base.Dispose(disposing);
        }
    }
}